package sdk;

import java.util.Map;
import java.util.TreeMap;
import model.OnlineLog;

public class DeviceLogSDK {
    private Client client;

    public DeviceLogSDK(Client client) {
        this.client = client;
    }

    public Map<String, Object> onlineLog(OnlineLog.OnlineLogReq req) {
        String appId = client.getAppId();
        String appSecret = client.getAppSecret();
        BuildClientSDK buildClient = new BuildClientSDK(appId,appSecret);
        Map<String, Object> getParams = new TreeMap<>();
        getParams.put("device_num", req.device_num); 
        getParams.put("page", req.pageModel.page); 
        getParams.put("limit", req.pageModel.limit); 
        Map<String, Object> getParamsf = buildClient.buildGetParam(getParams);
        return client.get("/open/device/log/online_log", getParamsf);
    }
}